3.58 \(\int \frac{(a+b \sec (c+d \sqrt{x}))^2}{\sqrt{x}} \, dx\)

Optimal. Leaf size=47 \[ 2 a^2 \sqrt{x}+\frac{4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt{x}\right )\right )}{d}+\frac{2 b^2 \tan \left (c+d \sqrt{x}\right )}{d} \]

[Out]

2*a^2*Sqrt[x] + (4*a*b*ArcTanh[Sin[c + d*Sqrt[x]]])/d + (2*b^2*Tan[c + d*Sqrt[x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0519136, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.227, Rules used = {4204, 3773, 3770, 3767, 8} \[ 2 a^2 \sqrt{x}+\frac{4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt{x}\right )\right )}{d}+\frac{2 b^2 \tan \left (c+d \sqrt{x}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*Sqrt[x]])^2/Sqrt[x],x]

[Out]

2*a^2*Sqrt[x] + (4*a*b*ArcTanh[Sin[c + d*Sqrt[x]]])/d + (2*b^2*Tan[c + d*Sqrt[x]])/d

Rule 4204

Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rule 3773

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[a^2*x, x] + (Dist[2*a*b, Int[Csc[c + d*x], x],
 x] + Dist[b^2, Int[Csc[c + d*x]^2, x], x]) /; FreeQ[{a, b, c, d}, x]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\left (a+b \sec \left (c+d \sqrt{x}\right )\right )^2}{\sqrt{x}} \, dx &=2 \operatorname{Subst}\left (\int (a+b \sec (c+d x))^2 \, dx,x,\sqrt{x}\right )\\ &=2 a^2 \sqrt{x}+(4 a b) \operatorname{Subst}\left (\int \sec (c+d x) \, dx,x,\sqrt{x}\right )+\left (2 b^2\right ) \operatorname{Subst}\left (\int \sec ^2(c+d x) \, dx,x,\sqrt{x}\right )\\ &=2 a^2 \sqrt{x}+\frac{4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt{x}\right )\right )}{d}-\frac{\left (2 b^2\right ) \operatorname{Subst}\left (\int 1 \, dx,x,-\tan \left (c+d \sqrt{x}\right )\right )}{d}\\ &=2 a^2 \sqrt{x}+\frac{4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt{x}\right )\right )}{d}+\frac{2 b^2 \tan \left (c+d \sqrt{x}\right )}{d}\\ \end{align*}

Mathematica [A]  time = 0.212921, size = 45, normalized size = 0.96 \[ \frac{2 \left (a^2 d \sqrt{x}+2 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt{x}\right )\right )+b^2 \tan \left (c+d \sqrt{x}\right )\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*Sqrt[x]])^2/Sqrt[x],x]

[Out]

(2*(a^2*d*Sqrt[x] + 2*a*b*ArcTanh[Sin[c + d*Sqrt[x]]] + b^2*Tan[c + d*Sqrt[x]]))/d

________________________________________________________________________________________

Maple [A]  time = 0.036, size = 60, normalized size = 1.3 \begin{align*} 2\,{a}^{2}\sqrt{x}+4\,{\frac{ab\ln \left ( \sec \left ( c+d\sqrt{x} \right ) +\tan \left ( c+d\sqrt{x} \right ) \right ) }{d}}+2\,{\frac{{b}^{2}\tan \left ( c+d\sqrt{x} \right ) }{d}}+2\,{\frac{{a}^{2}c}{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x)

[Out]

2*a^2*x^(1/2)+4/d*a*b*ln(sec(c+d*x^(1/2))+tan(c+d*x^(1/2)))+2*b^2*tan(c+d*x^(1/2))/d+2/d*a^2*c

________________________________________________________________________________________

Maxima [A]  time = 1.14184, size = 68, normalized size = 1.45 \begin{align*} 2 \, a^{2} \sqrt{x} + \frac{4 \, a b \log \left (\sec \left (d \sqrt{x} + c\right ) + \tan \left (d \sqrt{x} + c\right )\right )}{d} + \frac{2 \, b^{2} \tan \left (d \sqrt{x} + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x, algorithm="maxima")

[Out]

2*a^2*sqrt(x) + 4*a*b*log(sec(d*sqrt(x) + c) + tan(d*sqrt(x) + c))/d + 2*b^2*tan(d*sqrt(x) + c)/d

________________________________________________________________________________________

Fricas [B]  time = 1.85918, size = 261, normalized size = 5.55 \begin{align*} \frac{2 \,{\left (a^{2} d \sqrt{x} \cos \left (d \sqrt{x} + c\right ) + a b \cos \left (d \sqrt{x} + c\right ) \log \left (\sin \left (d \sqrt{x} + c\right ) + 1\right ) - a b \cos \left (d \sqrt{x} + c\right ) \log \left (-\sin \left (d \sqrt{x} + c\right ) + 1\right ) + b^{2} \sin \left (d \sqrt{x} + c\right )\right )}}{d \cos \left (d \sqrt{x} + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x, algorithm="fricas")

[Out]

2*(a^2*d*sqrt(x)*cos(d*sqrt(x) + c) + a*b*cos(d*sqrt(x) + c)*log(sin(d*sqrt(x) + c) + 1) - a*b*cos(d*sqrt(x) +
 c)*log(-sin(d*sqrt(x) + c) + 1) + b^2*sin(d*sqrt(x) + c))/(d*cos(d*sqrt(x) + c))

________________________________________________________________________________________

Sympy [A]  time = 8.60397, size = 90, normalized size = 1.91 \begin{align*} - \begin{cases} - \sqrt{x} \left (2 a^{2} + 4 a b \sec{\left (c \right )} + 2 b^{2} \sec ^{2}{\left (c \right )}\right ) & \text{for}\: d = 0 \\- \frac{2 a^{2} \left (c + d \sqrt{x}\right ) + 4 a b \log{\left (\tan{\left (c + d \sqrt{x} \right )} + \sec{\left (c + d \sqrt{x} \right )} \right )} + 2 b^{2} \tan{\left (c + d \sqrt{x} \right )}}{d} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(c+d*x**(1/2)))**2/x**(1/2),x)

[Out]

-Piecewise((-sqrt(x)*(2*a**2 + 4*a*b*sec(c) + 2*b**2*sec(c)**2), Eq(d, 0)), (-(2*a**2*(c + d*sqrt(x)) + 4*a*b*
log(tan(c + d*sqrt(x)) + sec(c + d*sqrt(x))) + 2*b**2*tan(c + d*sqrt(x)))/d, True))

________________________________________________________________________________________

Giac [B]  time = 1.4807, size = 119, normalized size = 2.53 \begin{align*} \frac{2 \,{\left ({\left (d \sqrt{x} + c\right )} a^{2} + 2 \, a b \log \left ({\left | \tan \left (\frac{1}{2} \, d \sqrt{x} + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, a b \log \left ({\left | \tan \left (\frac{1}{2} \, d \sqrt{x} + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{2 \, b^{2} \tan \left (\frac{1}{2} \, d \sqrt{x} + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d \sqrt{x} + \frac{1}{2} \, c\right )^{2} - 1}\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x, algorithm="giac")

[Out]

2*((d*sqrt(x) + c)*a^2 + 2*a*b*log(abs(tan(1/2*d*sqrt(x) + 1/2*c) + 1)) - 2*a*b*log(abs(tan(1/2*d*sqrt(x) + 1/
2*c) - 1)) - 2*b^2*tan(1/2*d*sqrt(x) + 1/2*c)/(tan(1/2*d*sqrt(x) + 1/2*c)^2 - 1))/d